package com.lxd.entity.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Date;
import com.lxd.entity.enums.DateTimePatternEnum;
import com.lxd.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;


/**
 * 
 */
public class User implements Serializable {


	/**
	 * 
	 */
	private Long userId;

	/**
	 * 
	 */
	private String email;

	/**
	 * 
	 */
	private String password;

	/**
	 * 
	 */
	private Integer sex;

	/**
	 * 
	 */
	private String userRealName;

	/**
	 * 
	 */
	private String userName;

	/**
	 * 
	 */
	private String role;

	/**
	 * 
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createdAt;

	/**
	 * 
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updatedAt;


	public void setUserId(Long userId){
		this.userId = userId;
	}

	public Long getUserId(){
		return this.userId;
	}

	public void setEmail(String email){
		this.email = email;
	}

	public String getEmail(){
		return this.email;
	}

	public void setPassword(String password){
		this.password = password;
	}

	public String getPassword(){
		return this.password;
	}

	public void setSex(Integer sex){
		this.sex = sex;
	}

	public Integer getSex(){
		return this.sex;
	}

	public void setUserRealName(String userRealName){
		this.userRealName = userRealName;
	}

	public String getUserRealName(){
		return this.userRealName;
	}

	public void setUserName(String userName){
		this.userName = userName;
	}

	public String getUserName(){
		return this.userName;
	}

	public void setRole(String role){
		this.role = role;
	}

	public String getRole(){
		return this.role;
	}

	public void setCreatedAt(Date createdAt){
		this.createdAt = createdAt;
	}

	public Date getCreatedAt(){
		return this.createdAt;
	}

	public void setUpdatedAt(Date updatedAt){
		this.updatedAt = updatedAt;
	}

	public Date getUpdatedAt(){
		return this.updatedAt;
	}

	@Override
	public String toString (){
		return "userId:"+(userId == null ? "空" : userId)+"，email:"+(email == null ? "空" : email)+"，password:"+(password == null ? "空" : password)+"，sex:"+(sex == null ? "空" : sex)+"，userRealName:"+(userRealName == null ? "空" : userRealName)+"，userName:"+(userName == null ? "空" : userName)+"，role:"+(role == null ? "空" : role)+"，createdAt:"+(createdAt == null ? "空" : DateUtil.format(createdAt, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()))+"，updatedAt:"+(updatedAt == null ? "空" : DateUtil.format(updatedAt, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()));
	}
}
